<%= form_for(@order) do |f| %>
  <% if @order.errors.any? %>
    <div class="alert alert-error">
      <h4><%= t('global_form_error') %></h4>
      <%= pluralize(@order.errors.count, t("global_form_error")) %><%= t('global_form_prohibited') %>
      <ul>
      <% @order.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :name %><br />
    <%= f.text_field :name, size: 40 %>
  </div>
  <div class="field">
    <%= f.label :address %><br />
    <%= f.text_area :address, rows: 3, cols: 40 %>
  </div>
  <div class="field">
    <%= f.label :email %><br />
    <%= f.text_field :email, size: 40 %>
  </div>
  <div class="field">
    <%= f.label :pay_type %><br />
    <%= f.select :pay_type, Order::PAYMENT_TYPES, prompt: 'Select a payment method' %>
  </div>
  <div class="field">
    <%= f.label :shipping_type %><br />
    <%= f.select :shipping_type, Order::SHIPPING_TYPES, prompt: 'Select a shipping type' %>
  </div>
  <div class="field">
  	<%= f.label :is_gift %><br />
  	<%= f.check_box :is_gift %>
  </div>
  <div class="actions">
    <%= f.submit 'Place Order', confirm: I18n.t('.confirm'), :class => 'btn' %>
  </div>
<% end %>
